<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateNoticeTemplatesTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('notice_templates', function (Blueprint $table) {
            $table->increments('id');
            $table->string('template_id')->nullable()->comment('第三方短信模板ID');
            $table->string('title')->comment('模板标题');
            $table->string('description')->comment('模板描述');
            $table->text('content')->nullable()->comment('模板内容');
            $table->unsignedTinyInteger('type')->default(1)->comment('模板类型，0:系统内部,1:第三方提供');
            $table->string('data_scope')->nullable()->comment('数据域');
            $table->timestamps();

            $table->comment = '通知模板表';
            $table->engine = 'InnoDB';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('notice_templates');
    }

}
